#include <51func.h>
int main(int argc, char *argv[])
{
    // ./13_fileno file1
    ARGS_CHECK(argc,2);
    FILE * fp = fopen(argv[1], "r+");
    ERROR_CHECK(fp,NULL,"fopen");

    //ssize_t sret = write(3,"hello",5);
    //ssize_t sret = write(fp->_fileno,"hello",5);
    ssize_t sret = write(fileno(fp),"hello",5);
    printf("sret = %ld\n", sret);

    fclose(fp);
    return 0;
}

